package GUI;

import javax.swing.*;
import java.util.*;
import java.awt.*;

public class AboutDialog extends JDialog {
	ResourceBundle lang;
	
	public AboutDialog(JFrame f) {
		super(f);
		lang = Options.getLanguage();
		
		super.setTitle(lang.getString("AboutDialog.text"));
		//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		setSize(400, 300);
		Toolkit toolkit = Toolkit.getDefaultToolkit();
		Dimension screenSize = toolkit.getScreenSize();
		int x = (screenSize.width - getWidth()) / 2;
		int y = (screenSize.height - getHeight()) / 2;
		setLocation(x, y);
		setVisible(true);
		
		JPanel panel = new JPanel(new FlowLayout());
		add(panel);
		
		JButton exitButton = new JButton(lang.getString("AboutDialog.exitButton.text"));
		panel.add(exitButton);
	}
}
